import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";

@Entity("recharge_order", { schema: "frog_charge" })
export class RechargeOrder {
  @PrimaryGeneratedColumn({ type: "int", name: "order_id", unsigned: true })
  orderId: number;

  @Column("int", { name: "user_id", unsigned: true, default: () => "'0'" })
  userId: number;

  @Column("tinyint", {
    name: "pay_channel",
    comment: ",1:2",
    default: () => "'0'",
  })
  payChannel: number;

  @Column("varchar", { name: "order_no", length: 25 })
  orderNo: string;

  @Column("varchar", { name: "trade_no", length: 64 })
  tradeNo: string;

  @Column("decimal", {
    name: "amount",
    precision: 5,
    scale: 2,
    default: () => "'0.00'",
  })
  amount: string;

  @Column("decimal", {
    name: "reward_amount",
    precision: 5,
    scale: 2,
    default: () => "'0.00'",
  })
  rewardAmount: string;

  @Column("tinyint", { name: "status", comment: " 01", default: () => "'0'" })
  status: number;

  @Column("int", { name: "create_time", unsigned: true, default: () => "'0'" })
  createTime: number;

  @Column("int", { name: "pay_time", unsigned: true, default: () => "'0'" })
  payTime: number;
}
